Skip to content

id-sync: B07 resolutions name the conflicting versions, not a local report - #11950

Merged
dezren39 merged 1 commit into
mainfrom
b07-conflict-key
Nov 18, 2026
Merged

dezren39 merged 1 commit into
mainfrom
b07-conflict-key

Conversation

@dezren39

@dezren39 dezren39 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Before: a B07 resolution had to name the receiving store's own report id. That id hashes when and from where the store saw each version, so two replicas holding the same conflict have different ids, and a resolution signed on one replica was refused on every other. Anti-entropy (B09) could never carry a resolution between replicas.

After: a resolution names the conflict itself, the ConflictKey of exactly the heads it joins (SHA-256 over the sorted event ids). The same signed resolution resolves the same conflict on every replica, while each replica keeps its own report as the durable record. The wire layout is unchanged (still 32 bytes after the 0x01 tag).

How: conflict_key() and ConflictReport::conflict_key() are new. apply accepts a version joining two or more heads only when its header names the key of the heads it joins; ResolutionRequired now also carries that key, and NotAResolution carries the key named. Report-first still holds: an object has two heads only while it has an open report, and the audit check now confirms each resolution closes a report created earlier that covers exactly the versions it names.

tests/federation_b07.rs (8 tests) computes the key independently, predicts outcomes from it, and adds a test where two replicas see the same versions in different orders, keep different report ids, and both accept the one signed resolution.

Refs #10248


Generated by Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…eport

A resolution's signed header now names the ConflictKey of exactly the
heads it joins (SHA-256 over the sorted event ids) instead of the
receiving store's report id. Report ids include when and from where a
replica saw each version, so they differ between replicas and a
resolution signed against one replica's report could never apply on
another. The key is the same everywhere the same versions are held;
each replica still keeps its own report, and report-first holds
because two heads always come with an open report.

Refs #10248

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dezren39
dezren39 requested a review from a team as a code owner November 18, 2026 22:20
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T22:21:43.614418Z 385a5ad PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39
dezren39 merged commit ded23b4 into main Nov 18, 2026
@dezren39
dezren39 deleted the b07-conflict-key branch November 18, 2026 22:20
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants